﻿<div class="tabbable">
    <ul class="nav nav-tabs">
        <li class="pull-right">
            <a data-bind="click:back" href="javascript:" class="btn btn-primary btn-sm">返回</a>
        </li>
    </ul>
</div>

<table class="table table-striped table-bordered table-hover">
    <thead>
        <tr class="ui-state-default">
            <th style="text-align:center">地区</th>
            <th style="text-align:center">运费</th>
            <th style="text-align:center">免运费金额</th>
            <th>&nbsp;</th>
        </tr>
    </thead>
    <tbody data-bind="foreach:freights">
        <tr>
            <td data-bind="text:RegionName"></td>
            <td data-bind="text:Freight"></td>
            <td data-bind="text:FreeAmount"></td>
            <td class="text-center">
                <a data-bind="click:$root.edit" class="btn btn-minier btn-info" style="margin-right: 4px;">
                    <i class="icon-pencil"></i>
                </a>
            </td>
        </tr>
    </tbody>
</table>

<div name="regionFreight" data-bind="with:$root.regionFreight" class="modal fade">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">
                    <span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
                </button>
                <h4 class="modal-title">地区运费</h4>
            </div>
            <div class="modal-body form-horizontal">
                <div class="form-group">
                    <label class="col-sm-2 control-label" data-bind="html:RegionName"></label>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">运费</label>
                    <div class="col-sm-10">
                        <input data-bind="value:Freight" type="text" class="form-control" placeholder="请输入运费金额" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">免运费</label>
                    <div class="col-sm-10">
                        <input data-bind="value:FreeAmount" type="text" class="form-control" placeholder="请输入免运费金额" />
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button data-bind="click:$root.confirm" type="button" class="btn btn-primary">确认</button>
                </div>
            </div>
        </div>
    </div>
</div>

